<?php
//同类商品
$goods['content']=ItemDesc($goods['data_id'],$goods['laiyuan_type'],1,1);
$tonglei_goods=$goods_class->index_list(array('code'=>$goods['code']),21,1,"code='".$goods['code']."' and cid='".$goods['cid']."' and id!=".$goods['id']);
foreach($tonglei_goods as $k=>$row){
	if($row['data_id']!=$goods['data_id']){
		$tonglei_goods[$k]['view']=u('tao','view',array('iid'=>iid_encode($row['data_id'])));
	}
}
if(count($tonglei_goods)>10){
	unset($tonglei_goods[10]);
}
?>
  
	<div class="detail-main-wrap">
  		<div class="bady-part">
			<div class="bady-tab" id="bady-tab">
				<ul>
					<li><a href="javascript:;" class="active">宝贝详情</a></li>
					<li><a href="<?=l('goods','index',array('code'=>'quan'))?>">优惠券热卖</a></li>
					<li><a href="<?=l('goods','index',array('code'=>'quan','do'=>'sell_desc'))?>">人气排行榜</a></li>
				</ul>
			</div>

  			<div class="con">
				<div class="information">
					<?php if($goods['content']!=''){?>
					<div class="item-desc"><?=$goods['content']?></div>
					<?php }else{?>
					<div class="tc f14 gray_3 pt50 pb50">暂无宝贝详细信息~</div>
					<?php }?>
				</div>
				</div>
 			</div>
		</div>

		<div class="similar-sidebar">
			<div class="title">同类热卖推荐</div>
			<div class="sidebar-inner">
				<ul>
					<?php foreach($tonglei_goods as $row){?>
					<li>
						<a target="_blank" title="<?=$row['title']?>" href="<?=$row['url']?>"><?=dd_html_img($row['img'],$row['title'],800)?></a>
						<div class="item-info">
							<div title="<?=$row['title']?>" class="item-title"><?=$row['title']?></div>
							<span class="item-price mr10"><span class="yen">¥</span><?=$row['discount_price']?></span>
							<?php if($goods['price_man']>0){?><span class="item-fan">优惠券<em><?=$row['price_jian']?></em>元</span><?php }?>
						</div>
					</li>
					<?php }?>
				</ul>
			</div>
		</div>
		<div class="clear"></div>
	</div>
</div>
<script type="text/javascript" src="<?=TPLURL?>/vip/js/jquery.lazyload.js"></script> 
 <script type="text/javascript">	  
	$(function() {
	$("img").lazyload({
		effect : "fadeIn"
	});
});
</script>